package com.ysh.smartplatform.mapper;

import com.ysh.smartplatform.pojo.Operlog;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 袁胜虎 on 2022/9/15 11:33
 */
public interface OperlogMapper {
    @Insert("insert into sys_oper_log values (#{operId},#{title},#{businessType},#{method},#{requestMethod},#{operatorType},#{operName},#{operUrl},#{operIp},#{operLocation},#{operParam},#{jsonResult},#{status},#{errorMsg},#{operTime})")
    int insertSelective(Operlog record);

    @Delete("delete from sys_oper_log where oper_id = #{operId}")
    void deleteById(Long operId);

    @Update("update sys_oper_log set title=#{title}, business_type=#{businessType},method=#{method} where oper_id = #{operId}")
    int updateOper(Operlog operlog);

    @Select("select * from sys_oper_log where oper_id = #{operId}")
    void selectById(Long operId);

}
